package cn.wolfcode.p2p.business.domain;

import cn.wolfcode.p2p.base.domain.BaseDomain;
import cn.wolfcode.p2p.base.domain.LoginInfo;
import cn.wolfcode.p2p.util.Constants;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;

@Setter @Getter
public class CreditTransfer extends BaseDomain {
    /*
      乐观锁
  */
    private int version;

    /*
     对应投标id
      */
    private Long bidId;
    /*
     对应借款
      */
    private Long bidRequestId;
    /*
     认购本金 :就是债权当前的金额
      */
    private BigDecimal bidRequestAmount;
    /*
     借款利率同bidRequest
      */
    private BigDecimal currentRate;
    /*
     还款方式 同bidRequest
      */
    private int returnType;
    /*
     总还款期数 同bidRequest
      */
    private int monthIndex;
    /*
     债权标剩余还款期数
      */
    private int remainMonthIndex;
    /*
     债权标剩余利息
      */
    private BigDecimal remainInterest;
    /*
     最近还款时间
      */
    private Date closestDeadLine;

    /*
     原借款名称 同bidRequest
      */
    private String bidRequestTitle;
    /*
       债权状态 :招标中 , 已认购, 撤销
      */
    private int bidRequestState = Constants.BIDREQUEST_STATE_BIDDING;
    /*
        转出人
      */
    private LoginInfo transFrom;
    /*
     接手人
      */
    private LoginInfo transTo;

    /*
     发布时间
      */
    private Date publishDate;
    /*
     接手时间
      */
    private Date transDate;
}
